let helloWorld = "Hello World";


interface User { 
	name: string,
	id:number
}

interface User { 
	Age: number;
	address: string | null | undefined;
}

interface UserExt extends User { 
	gender: string;
}


type Pt = {
	x: number;
	y: number;
}

interface Usr {
	name: string;
	id: number;
	age?: number;
}

const user0:User = {
	name: "Calos",
	id: 0,
	Age: 1,
	address:null
}

class UserAccount { 
	name: string;
	id: number;
	constructor(name: string, id: number) { 
		this.name = name;
		this.id=id
	}
}

const user:Usr=new UserAccount("Calos1",1)

function deleteUser(user: User) { 

}
function getAdminUser(): Usr { 
	return user
}


type MyBool = true | false;
type WindowStates = "open" | "closed" | "minimized";
type PositiveOddNumbersUnderTen = 1 | 3 | 5 | 7 | 9;

function getLength(obj: string | string[]) { 
	return obj.length;
}

const x: WindowStates = "minimized";

function wrapInArray(obj: string | string[]) { 
	return (typeof obj==="string"?[obj]:obj);
}

interface Backpack<Type> { 
	add: (obj: Type) => void;
	get: () => Type;
}

declare const backpack: Backpack<string>
backpack.add("23");
backpack.get();

let ax: any = { x: 0 }

function objType(pt: { x: number, y: number }) { 

}

function unitonType(id: number | string) { 

}

let x1: "hello" = "hello";
x1 = "hello";

type Fish = { swim: () => void };
type Bird = { fly: () => void };
function move(animal: Fish | Bird) { 
	if ("fly" in animal) { 
		return animal.fly();
	}
}

const someClass = class <Type> { 
	content: Type;
	constructor(value: Type,public readonly x:number,protected y:number,private z:number) { 
		this.content = value;
	}
}


abstract class ABase { 
	abstract getName(): string;
}

class Base { 
	name = "hello";
	_length = 0;
	get length() { 
		return this._length;
	}
	set length(value) {
		this._length = value;
	}
	public greet() { 

	}
}

class Greeter extends Base { 
	public name1 = "i am who";
	protected name2 = "answered";
	private name3 = "can set from constructor";
	static x=0
	#barkAmount = 0;
	readonly name: string = "world";
	constructor(xy: string);
	constructor(otherName?: string) { 
		super()
		if (otherName !== undefined) { 
			this.name=otherName
		}
	}

	public greet(): void {
		
	}

	

	err() { 

	}
}

type GreeterInstance = InstanceType<typeof Greeter>

function mov(greeter: GreeterInstance) { 
	greeter.greet()
}

export default function Hello() { 

}

import { Hi } from "./Hi.js"

enum Direction { 
	up = 1,
	Down,
	Left,
	Right,
}

const el1=document.getElementById("el1")